package com.scs.application.modules.wm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;
/**
 * <p>
 * 科室请领单明细
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "配送明细表")
@TableName("wm_dist_item")
@EntityIndexAnnotation(ix = {"gmt_modified,dist_id","dist_id","apply_item_id","apply_item_id,dist_id"})
public class DistItem extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "外键",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String distId;

    @EntityFieldAnnotation(
            text = "关联请领ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String applyId;

    @EntityFieldAnnotation(
            text = "=dept_apply_item.id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String applyItemId;

    @EntityFieldAnnotation(
            text = "耗材ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "品名",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrName;

    @EntityFieldAnnotation(
            text = "品规",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrSpec;

    @EntityFieldAnnotation(
            text = "包装单位",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String packageUnit;

    @EntityFieldAnnotation(
            text = "包装数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double packageQty;

    @EntityFieldAnnotation(
            text = "包装比率",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double packageRate;

    @EntityFieldAnnotation(
            text = "单品单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String skuUnit;

    @EntityFieldAnnotation(
            text = "单品数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuQty;

    @EntityFieldAnnotation(
            text = "单品单价(元)",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuPrice;

    @EntityFieldAnnotation(
            text = "小计(元)",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double amount;

    @EntityFieldAnnotation(
            text = "已拣货单品数量",
            length = "",
            not_null = true,
            default_value = "0.0000",
            comment = ""
    )
    private Double pickedSkuQty;

    @EntityFieldAnnotation(
            text = "已拣货金额",
            length = "255",
            not_null = false,
            default_value = "0.0",
            comment = ""
    )
    private Double pickedAmount;

    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    @EntityFieldAnnotation(
            text = "是否有货",
            type = EntityFieldType.TINYINT,
            not_null = true,
            default_value = "1",
            comment = ""
    )
    private String flagHave;

    /**
     * 是否显示背景颜色
     */
    @TableField(exist = false)
    private String rowBgColor;

    /**
     * 配送仓库默认库位id
     */
    @TableField(exist = false)
    private String locationIdDist;

    /**
     * 配送仓库默认库位名称
     */
    @TableField(exist = false)
    private String locationNameDist;

    /**
     * 配送仓库默认库位代码
     */
    @TableField(exist = false)
    private String locationIdCodeDist;


    /**
     * 接收仓库默认库位id
     */
    @TableField(exist = false)
    private String locationIdReceive;

    /**
     * 接收仓库默认库位名称
     */
    @TableField(exist = false)
    private String locationNameReceive;

    /**
     * 接收仓库默认库位代码
     */
    @TableField(exist = false)
    private String locationIdCodeReceive;


    @EntityFieldAnnotation(
            text = "开单单位",
            length = "10",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String billPackageUnit;


    @EntityFieldAnnotation(
            text = "开单单位比率",
            length = "10",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Double billPackageRate;


    @EntityFieldAnnotation(
            text = "开单单位数量",
            length = "10",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Double billPackageQty;

    // creator ,在父类中处理


    // gmt_create ,在父类中处理


    // modifier ,在父类中处理


    // gmt_modified ,在父类中处理

    @EntityFieldAnnotation(
            text = "耗材型号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "耗材型号"
    )
    private String matrModel;}
